package com.demo.support.task;

import java.lang.reflect.Method;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.jweb.annotaion.JTask;

@JTask(cron = "0 0/10 * * * ?")
public class JtaskJob implements Job {
	
	private Logger log = LoggerFactory.getLogger(getClass());
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		log.info("[{}]:任务执行 ",new Object[]{context.getJobDetail().getKey()});
		try {
//			String email=JWebFilter.getConstants().get("email.temp.url");
//			String emailValue=HttpRequestUtil.sendGet(email, "");
//			emailValue=FormatUtil.formatParams(emailValue, new Object[]{"袁启勇先生",FormatUtil.getNowTime()});
//			MailUtil mail=new MailUtil("1300916207@qq.com", "yqy563930552");
//			mail.sendMail(new String[] { "563930552@qq.com" }, "支付之家邮箱验证",emailValue, "明天网络科技");

			//JWebFilter.getJdbctemplate().update("INSERT INTO test.test (name,pwd,create_time) VALUES (?,?,NOW())", new Object[] { "AAb", "bbc" });
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	
}
